/*  Copyright (C) 2008  Alexander Blyzniuchenko (BlezAlex)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

using System;

namespace DC
{
    public enum TaskStatus
    {
        Connecting, Downloading, Completed, Failed, Canceled
    }

    public class Task
    {
        private TaskStatus _status;
        public TaskStatus Status
        {
            get { return _status; }
            set { _status = value; }
        }

        private long _total = 100;
        public long Total
        {
            get { return _total; }
            set { _total = value; }
        }

        private long _position = 100;
        public long Position
        {
            get { return _position; }
            set { _position = value; }
        }

        private string _user;
        public string User
        {
            get { return _user; }
            set { _user = value; }
        }

        private string _file;
        public string File
        {
            get { return _file; }
            set { _file = value; }
        }

        private string _text = string.Empty;
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }

    }

    public class  TaskEventArgs : EventArgs
    {
        private Task _task;
        
        public TaskEventArgs(Task t)
        {
            _task = t;
        }
        
        public Task Task
        {
            get { return _task; }
        }
    }
}
